<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>模板编辑器</title>
    <!-- 引入样式 -->
    <link
      rel="stylesheet"
      href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"
    />
  </head>

  <style>
    * {
      margin: auto;
      padding: 0px;
    }
    html,
    body {
      height: 100%;
      width: 100%;
    }
    #panel-config {
      height: 100%;
      position: absolute;
      width: 35%;
      left: 0px;
    }
    #panel-preview {
      height: 100%;
      position: absolute;
      width: 65%;
      right: 0px;
      background: cadetblue;
    }
    #panel-preview iframe {
      width: 100%;
      height: 100%;
      overflow: auto;
    }
    /*分割线分割高度*/
    .el-divider {
      margin: 10px 0px;
    }
  </style>
  <body>
    <div id="app">
      <div id="panel-config">
        <el-card class="box-card card-config">
          <el-button size="mini">保存</el-button>
          <el-button size="mini" type="primary">预览</el-button>
        </el-card>

        <el-input
          type="textarea"
          :rows="2"
          placeholder="请输入内容"
          v-model="code"
          style="width: 100%;height: 100%;"
        >
        </el-input>
      </div>
      <div id="panel-preview">
        <iframe src="previewpage/index.html" frameborder="0"></iframe>
      </div>
    </div>

    <!-- import Vue before Element -->
    <script src="https://unpkg.com/vue/dist/vue.js"></script>
    <!-- import JavaScript -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <script>
      new Vue({
        el: "#app",
        data() {
          return {
            code:'',
            resources: [
              {
                id: "1",
                name: "sdds.js",
              },
              {
                id: "2",
                name: "sdds.css",
              },
              {
                id: "2",
                name: "sdds.css",
              },
              {
                id: "2",
                name: "sdds.css",
              },
              {
                id: "2",
                name: "sdds.css",
              },
              {
                id: "2",
                name:
                  "sdd是否顶顶顶顶顶顶顶顶顶顶顶顶是的烦烦烦烦烦烦烦烦烦烦烦烦烦烦烦s.css",
              },
              {
                id: "2",
                name: "sdds.css",
              },
              {
                id: "2",
                name: "sdds.css",
              },
            ],
          };
        },
      });
    </script>
  </body>
</html>
